package cz.none.bezbarier.web.service;

import java.io.Serializable;
import java.util.List;

import org.springframework.transaction.annotation.Transactional;

import cz.none.bezbarier.web.service.exception.ServiceException;

@Transactional
public interface BaseService<Form, Model, ID extends Serializable> {

	@Transactional(readOnly = true)
	public List<Model> findAll();

	@Transactional(readOnly = true)
	public Model find(ID id) throws ServiceException;

	public Form fillForm(ID id) throws ServiceException;

	public void save(Model model);

	public void saveForm(Form form);

	public void delete(ID id);
}
